
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>用户注册</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/comon0.css">
    <script>
        function checkPwd(){
            var pwd=document.frm.password.value;
            var pwd_confirm=document.frm.pwd_confirm.value;
            if(pwd!=pwd_confirm){
                alert("两次密码不一致！");
                return false;
            }
            return true;
        }
    </script>
    <style>
        .container{
            margin-top: 9%;
            margin-left: 32.5%;
            width: 35%;
            height:50%;
            background-color:rgba(255,255,255,0.01)
        }
        .btn-primary{
            background-color: #007bff;
            border-color: #0b2e13;
        }
        label{
            font-size: large;
        }
    </style>
</head>
<body>
<div class="canvas">

    <iframe src="${pageContext.request.contextPath}/js/canvas.html" frameborder="0" style="width: 100%; height: 100%"></iframe>
</div>
<h1 style="align-self: center;justify-self: center">欢迎使用成都生活大数据平台</h1>
<div class="container" align="center" >
    <h2>用户注册</h2>

    <form name="frm" action="/user/doregister" method="post" onsubmit="return checkPwd();" >
        <div>
            <table style="border-collapse:separate; border-spacing:0px 20px;">
                <tr><td width="30%"><label>用户名：</label></td><td width="70%"><input type="text" name="username" required style="width: 100%;height: 35px;background-color:rgba(255,255,255,0.15);border-radius:12px;border: 1px solid #ccc;padding: 7px 0px;" maxlength="50"></td></tr>
                <tr><td><label>密&nbsp;&nbsp;&nbsp;&nbsp;码：</label></td><td><input type="password" name="password" required  maxlength="50"style="width: 100%;height: 35px;background-color:rgba(255,255,255,0.15);border-radius:12px;border: 1px solid #ccc;padding: 7px 0px;"></td></tr>
                <tr><td><label>确认密码：</label></td><td><input type="password" name="pwd_confirm" required  maxlength="50"style="width: 100%;height: 35px;background-color:rgba(255,255,255,0.15);border-radius:12px;border: 1px solid #ccc;padding: 7px 0px;"></td></tr>
                <tr><td colspan="2">&nbsp; <span style="color: red">${sessionScope.errmsg}</span></td></tr>
                <tr><td></td><td><button class="btn btn-log btn-primary btn-dark" type="submit" style="background-color:rgba(255,255,255,0.05);width: 80%;height:50px;font-size: 170%;border-radius:15px;line-height: 40px;border: 1px solid #ccc;padding: 7px 0px;">注册</button></td></tr>
            </table>
        </div>
    </form>
</div>

</body>
</html>
